package com.biostime.dingdingbox.common.datasource;

/**
 *   数据源的切换
 * @author chenweicheng
 *	@version 2016-06-15
 */
public class DataSourceSwitch{  
    private static final ThreadLocal<String> contextHolder=new ThreadLocal<String>();  
      
    public static void setDataSourceType(String dataSourceType){  
        contextHolder.set(dataSourceType);  
    }  
       
    public static String getDataSourceType(){  
        return (String) contextHolder.get();  
    }  
      
    public static void clearDataSourceType(){  
        contextHolder.remove();  
    }  
}  
